﻿<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<script language="c#" runat="server">
protected string CurrentNamespace
{
	get
	{
		if (!String.IsNullOrEmpty(Request.QueryString["Namespace"]))
			return Request.QueryString["Namespace"];
		else if (Request.Cookies["Namespace"] != null)
			return Request.Cookies["Namespace"].Value;
		else
			return "";
	}
}
</script>
<section data-page="template_menu_list" data-title="模块菜单" data-lang="<%=ContentLang%>" data-template-path="<%=Request.QueryString["TemplatePath"]%>">
	<dl class="path1">
		<dt><span>您的位置：</span><a href="../list.aspx" target="ali-navtab">模板列表</a> → <%=Request.QueryString["TemplatePath"]%></dt>
	</dl>
	<div class="ali-tabs sub-nav" data-height-style="fill" data-event="click">
		<div class="ali-tabs-header">
			<div class="ali-tabs-nav-container">
				<ul>
					<li><a href="../edit.aspx?Path=<%=Request.QueryString["TemplatePath"]%>" target="ali-navtab">编辑</a></li>
					<li><a href="../dictionary.aspx?TemplatePath=<%=Request.QueryString["TemplatePath"]%>" target="ali-navtab">词典</a></li>
					<li><a href="../module.aspx?TemplatePath=<%=Request.QueryString["TemplatePath"]%>" target="ali-navtab">模块邦定</a></li>
					<li><a href="../pages/list.aspx?TemplatePath=<%=Request.QueryString["TemplatePath"]%>" target="ali-navtab">页面列表</a></li>
					<li><a href="../pages/add.aspx?TemplatePath=<%=Request.QueryString["TemplatePath"]%>" target="ali-navtab">添加页面</a></li>
					<li><a href="../script/list.aspx?TemplatePath=<%=Request.QueryString["TemplatePath"]%>" target="ali-navtab">脚本列表</a></li>
					<li><a href="../script/add.aspx?TemplatePath=<%=Request.QueryString["TemplatePath"]%>" target="ali-navtab">添加脚本</a></li>
					<li class="ali-active"><a>模块菜单</a></li>
					<li><a href="add.aspx?TemplatePath=<%=Request.QueryString["TemplatePath"]%>" target="ali-navtab">添加菜单</a></li>
				</ul>
			</div>
		</div>
		<div class="ali-tabs-body">
			<div class="ali-tabs-panel"></div>
			<div class="ali-tabs-panel"></div>
			<div class="ali-tabs-panel"></div>
			<div class="ali-tabs-panel"></div>
			<div class="ali-tabs-panel"></div>
			<div class="ali-tabs-panel"></div>
			<div class="ali-tabs-panel"></div>
			<div class="ali-tabs-panel">
				<form action="?TemplatePath=<%=Request.QueryString["TemplatePath"]%>" class="search1">
					模块：
					<select name="Namespace" data-class="<%=ContentLang%>Font" data-ali-widget="combo">
						<ali:List Object="Module">
							<ali:Record>
								<%If String.Equals(Namespace, CurrentNamespace)%>
									<option value="<%=Namespace%>" selected="selected"><%=Name%></option>
								<%Else%>
									<option value="<%=Namespace%>"><%=Name%></option>
								<%EndIf%>
							</ali:Record>
						</ali:List>
					</select>
					<button type="submit" class="ali-button">搜索</button>
				</form>
				<div class="content">
					<table data-ali-widget="grid" class="grid1" data-tree="true" data-root="">
						<thead>
							<tr>
								<th width="40">编号</th>
								<th>名称</th>
								<th width="80">删除</th>
							</tr>
						</thead>
						<tbody>
							<ali:Tree Object="Template.Menu" Condition="TemplatePath=Request.QueryString['TemplatePath'] and Namespace=CurrentNamespace" Validate="True">
								<ali:Record>
									<tr data-id="<%=InnerID%>">
										<td data-sort="<%=InnerID%>" data-name="<%=Name%>"><%=InnerID%></td>
										<th data-item="<%=InnerID%>" data-parent="<%=ParentInnerID%>"><a href="edit.aspx?Lang=<%=ContentLang%>&Namespace=<%=CurrentNamespace%>&TemplatePath=<%=Request.QueryString["TemplatePath"]%>&ID=<%=InnerID%>" target="ali-navtab"><%=Name%></a></th>
										<td><a href="" class="ali-button" data-operation="Delete">删除</a></td>
									</tr>
									<%=ChildRecords%>
								</ali:Record>
							</ali:Tree>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		<div class="ali-tabs-bottom"><b></b></div>
	</div>
</section>